CAL evaluates expressions according to standard mathematical rules of precedence:
Numeric expressions are real integer numbers and functions combined with the operators in the following table.
Numeric operators |
|
|---|---|
Operator |
Operation |
( ) |
Groups expressions |
^ |
Indicates exponentiation |
* , / |
Multiplies, divides |
+, - |
Adds, subtracts |
A vector expression is a collection of points, vectors, numbers, and functions combined with the operators in the following table.
The following are examples of vector expressions:
A+[1,2,3] provides the point located [1,2,3] units relative to point A.
[2<45<45] + [2<45<0] - [1.02, 3.5, 2]
adds two points and subtracts a third point. The first two points are expressed in spherical coordinates.